<?php

	/**
	* @author Robbie Vasquez
 	* @author Matt Kennedy
 	*/

class Files extends Model
{
	var $username = '';
	
	public function Files()
	{
		// Call the model constructor
		parent::Model();
		
		$this->load->database();
	}
	
	public function docs()
	{
		$username = $_SESSION['username'];
		 
		 if(is_dir("uploads/" . $username))
		 {
			$check_dir = opendir("uploads/" . $username);
		
			// get each entry
			while($file_list = readdir($check_dir))
				$dirArray[] = $file_list;
		
			return $dirArray;
		}			
	}
}